package com.svse.designPattern.behaviour.command.invoker;

import com.svse.designPattern.behaviour.command.command.Command;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/8/6 20:34
 */
public class Invoker {
    private Command command;

    public Invoker(Command command) {
        this.command = command;
    }
    public void setCommand(Command command)
    {
        this.command=command;
    }
    public void call(){
        System.out.println("调用者执行命令command...");
        command.execute();
    }
}
